/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __IMPL_MGR_H__
#define __IMPL_MGR_H__

namespace xos_net
{

    class mgr : public i_net
    {
    public:
        typedef xos::release_impl<mgr> T;

    public:
        mgr();
        ~mgr();

    public:
        static int static_init( xos_container::i_container * pContainer, i_net ** ppv );
        static xos_container::i_container* container();
        static mgr * get();

        // 
        // i_net
        // 
    public:
        int set_heart_check_interval_ms( int n_heart_interval_ms );
        int set_callback( xos_box::i_notify * pNotify );
        xos_box::i_notify * notify();

    protected:
        xos_box::i_notify * m_pNotify;

    public:
        int put_back_to_pool();
        int init();
        int term();

    };

} // xos_net

#endif // __IMPL_MGR_H__
